<?php
//  This file is part of EkkinCMS.
//
//  EkkinCMS is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  EkkinCMS is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with EkkinCMS.  If not, see <http://www.gnu.org/licenses/>.

include( "ext_lib/accept-to-gettext.inc.php" );

$langs_supported = array(
    "en_US",
    "nl_NL",
    "es_MX"
);

$lang = al2gt($langs_supported, 'text/html');
$lang = $lang[gettextlang];

if (isset($_GET["lang"])){
    $lang = $_GET["lang"];
}



// Translation stuff
setlocale( LC_MESSAGES, "$lang.utf-8");
textdomain("ekkincms");
bindtextdomain("ekkincms", "locale");
bind_textdomain_codeset("ekkincms", 'UTF-8');

$a = explode("_", $lang);
$lang = $a[0];



?>
